home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickTime™ VR 2.0 SDK / QTVR C⁄C++ Runtime API / Sample Code / VRShell Sample Code / VRSpeech / TestFunctions.h < prev    next >
Encoding:
Text File  |  1997-05-22  |  1.7 KB  |  57 lines  |  [TEXT/MPCC]

  1. //
  2. //    File:        TestFunctions.h
  3. //
  4. //    Contains:    Speech recognition support for QuickTime VR movies.
  5. //
  6. //    Written by:    Tim Monroe
  7. //
  8. //    Copyright:    © 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //    Change History (most recent first):
  11. //
  12. //       <1>         12/05/96    rtm        ported earlier speech recognition support functions to VRShell
  13. //       
  14. //
  15.  
  16. // header files
  17.  
  18. #include "SpeechRecognition.h"
  19. #include <AppleEvents.h>
  20. #include <Timer.h>
  21. #include "QTVR.h"
  22. #include "DTSQTUtilities.h"
  23.  
  24.  
  25. // function prototypes
  26. // speech recognition support public functions prototypes
  27.  
  28. void            SpeechInit (void);
  29. void            SpeechStop (void);
  30. pascal OSErr    HandleSpeechBegunAppleEvent (AppleEvent *theAEevt, AppleEvent* reply, long refcon);
  31. pascal OSErr    HandleSpeechDoneAppleEvent (AppleEvent *theAEevt, AppleEvent* reply, long refcon);
  32. OSErr            ReadLanguageModelsFromResource (void);
  33. Boolean            GoDirByDegrees (QTVRInstance theInstance, long theDir, long theAmt);
  34. Boolean            GoDirByRadians (QTVRInstance theInstance, long theDir, long theAmt);
  35. void            ZoomInOrOut(QTVRInstance theInstance, long theDir);
  36. void            DoEventLoopSpinCheck (void);
  37. Boolean            IsSpinning (void);
  38. void            StartSpinning (QTVRInstance theInstance, long theDir);
  39. void            StopSpinning (void);
  40. pascal OSErr    SpeakNameOfNode (QTVRInstance theInstance, long nodeID, SInt32 refCon);
  41. void            InstallSpeechFeedbackRoutine (QTVRInstance theInstance);
  42.  
  43. // miscellaneous constants
  44. #define kLMResourceType            'LMDL'
  45. #define kLMResourceID            129
  46.  
  47. #define kSpinMillisecsDelay        25                //empirically determined
  48.  
  49. // an expanded Time Manager record
  50. // we use this to manage the spinning around
  51. typedef struct MyTMTask {
  52.     TMTask            theTMTask;
  53.     long            theSpinDir;
  54.     long            theSpinAmt;
  55.     long            theSpinDelay;
  56.     QTVRInstance    theInstance;
  57. } MyTMTask, *MyTMTaskPtr;